# Maintainer:
# Contributor:  Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Allan McRae <allan@archlinux.org>

pkgname=dejagnu
pkgver=1.6.3
pkgrel=7
pkgdesc='Framework for testing other programs'
arch=(any)
url='https://www.gnu.org/software/dejagnu/'
license=(GPL)
depends=(sh expect)
checkdepends=(tcl)
source=(https://ftp.gnu.org/gnu/dejagnu/${pkgname}-${pkgver}.tar.gz{,.sig})
sha256sums=('87daefacd7958b4a69f88c6856dbd1634261963c414079d0c371f589cd66a2e3'
            'SKIP')
validpgpkeys=('152F3EADD335FF629611128567DADC3E3F743649'  # Ben Elliston
              'D231B45ECB0B7BD8F6E7A682CE9D6843AABACC90') # Jacob Bachmeyer (2021 DejaGnu Release Signing Key)

build() {
  mkdir -p build
  cd build
  ../$pkgname-$pkgver/configure --prefix=/usr
  make
}

check() {
  cd build
  make check
}

package() {
  cd build
  make DESTDIR="$pkgdir" install
}
